package com.zjc.yohoshop.mvp.view.adapter;

import android.util.Log;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.zjc.yohoshop.R;
import com.zjc.yohoshop.bean.BrandEntity;
import com.zjc.yohoshop.network.API;

/**
 * 推荐品牌的全部品牌的适配器
 */
public class BrandRecommendAdapter extends BaseQuickAdapter<BrandEntity.Values, BaseViewHolder> {
    public BrandRecommendAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(BaseViewHolder helper, BrandEntity.Values item) {
        ImageView imageView = helper.getView(R.id.iv_item_brand_recommend_img);
        Glide.with(helper.itemView.getContext()).load(API.BaseUrl + item.brand_icon).into(imageView);
        helper.setText(R.id.tv_item_brand_recommend_name, item.brand_name);
    }
}
